<?php

namespace app\controller;

use think\Controller;
use think\facade\Session;

class Auth extends Controller
{

    public function logout()
    {
        Session::clear();
        $this->success('logout success', '/');
    }

    protected function initialize()
    {
        if (!is_login()) {
            $this->redirect('account/login');
        }
    }

}
